package model;

import java.util.Date;


/**
 * 
 * Description: 资源的实体类。
 * 
 * @since  2009/3/3
 * @author ashen
 * 
 */
public class Node {
	private Integer id;
	private String name;
	private String description;
	private Date createDate;
	private Integer ownerId;
	
	
	public Node(Integer id, String name, String description,
			Date createDate, Integer ownerId) {
		super();
		this.id = id;
		this.name = name;
		this.description = description;
		this.createDate = createDate;
		this.ownerId = ownerId;
	}


	public Node() {
		// TODO Auto-generated constructor stub
	}


	public Integer getId() {
		return id;
	}


	public void setId(Integer id) {
		this.id = id;
	}


	public String getName() {
		return name;
	}


	public void setName(String name) {
		this.name = name;
	}


	public String getDescription() {
		return description;
	}


	public void setDescription(String description) {
		this.description = description;
	}
	

	public Date getCreateDate() {
		return createDate;
	}


	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}


	public Integer getOwnerId() {
		return ownerId;
	}


	public void setOwnerId(Integer ownerId) {
		this.ownerId = ownerId;
	}
	
	public Node toNode() {
		Node node=new Node();
		node.setCreateDate(getCreateDate());
		node.setDescription(getDescription());
		node.setId(getId());
		node.setName(getName());
		node.setOwnerId(getOwnerId());
		return node;
	}

}
